package student.stu23002142.chapter13;

import java.io.InputStream;
import java.net.URL;
import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) throws Exception {
    URL url = new
            URL("http","www.itcast.cn",80,"/subject/uidszly/index.html");
    InputStream input = url.openStream();
    Scanner scan = new Scanner(input);
    scan.useDelimiter("\n");
    while(scan.hasNext()){
        System.out.println(scan.next());
    }
}
}
